package com.cloudfun.campusshare.common;

import com.cloudfun.campusshare.entity.UserEntity;

/**
 * @author : zhangyongjie
 * @version : 1.0
 * @createTime : 2020/4/29 23:24
 * @description :
 */
public class WechatUserHolder {

    private static ThreadLocal<String> user = new ThreadLocal<>();

    public static void set(String userId){
        user.set(userId);
    }


    public static String get(){
        if(user.get() == null){
            return null;
        }
        return user.get();
    }

    public static void remove(){
        user.remove();
    }
}
